package org.example.demo;

import lombok.Data;

import java.awt.*;

@Data
public class STT {
    private Boolean running = false;
    private Boolean gameOver = false;

    public void toggle(){
        running = !running;
    }

    public void gameOver(){
        gameOver = true;
    }

    public void paint(Graphics g){
        g.setColor(Color.WHITE);
        g.setFont(new Font("微软雅黑", Font.BOLD, 40));
        if (gameOver){
            g.drawString("游戏结束",300,300);
        }
        if (!running){
            g.drawString("按下空格开始游戏", 300, 300);
        }
    }

}
